import Vue from 'vue'
import Router from 'vue-router'
import login from '@/view/login/login'
import { resolve } from 'url';

Vue.use(Router)

export default new Router({
    mode: "history",
    routes: [{
            path: "/",
            name: "login",
            component: login
        },
        {
            path: "/login",
            component: login,
            redirect: "/"
        },
        {
            path: "/index",
            name: "index",
            component: resolve => require(["@/view/pages/index"], resolve),
            children: [{

            }]
        },
        {
            path: '**',
            redirect: '/'
        }
    ]
})